#ifndef MTV_SERVICE_EVENT_H
#define MTV_SERVICE_EVENT_H

#if __GNUC__ > 3 || _MSC_VER > 1020
#pragma once
#endif

#ifndef __cplusplus
#error this header requires C++ compiler
#endif

#include "service_event.h"

//namespace broadcast
//{
//
// service event and listener definitions
//
enum // service_event_type
{
    // for transaction

    // for Interactivity
    SERVICE_INTERACTIVITY_BASE = 0x2000,
    SERVICE_INTERACTIVITY_DATA,

    // for proc (proc_sg, proc_st, proc_gba,subscirbe, unsubscribe)
    SERVICE_UPDATESG_COMPLETED = 0x4000,
    SERVICE_INITIALIZE_COMPLETED = 0x4001,
    SERVICE_AUTHORIZE_COMPLETED = 0x4002,
    SERVICE_SUBSCRIBE_COMPLETED = 0x4003,
    SERVICE_UNSUBSCRIBE_COMPLETED = 0x4004,
    SERVICE_INQUIRY_COMPLETED = 0x4005,
    SERVICE_UPDATEST_COMPLETED = 0x4006,
    SERVICE_INTERACT_COMPLETED = 0x4007,
    SERVICE_UNSUBSCRIBEALL_COMPLETED = 0x4008,
    SERVICE_ACTIVATE_COMPLETED = 0x4009,
};

enum // service_error_type
{
    // for transaction
    SERVICE_TRANSACTION = 1,

    // for Interactivity
};

// update Service Guide complete event
struct service_updatesg_complete_event: service_event
{
    service_updatesg_complete_event(int a_result = 0);

    int result;
};

// update Subscribe Information Table complete event
struct service_updatest_complete_event: service_event
{
    service_updatest_complete_event(int a_result = 0);

    int result;
};

// execute GBA bootstrap complete event
struct service_initialize_complete_event: service_event
{
    service_initialize_complete_event(int a_result = 0);

    int result;
};

// execute authorize complete event
struct service_authorize_complete_event: service_event
{
    service_authorize_complete_event(int a_result = 0);

    int result;
};

// execute subscribe complete event
struct service_subscribe_complete_event: service_event
{
    service_subscribe_complete_event(int a_result = 0);

    int result;
};

// execute unsubscribe complete event
struct service_unsubscribe_complete_event: service_event
{
    service_unsubscribe_complete_event(int a_result = 0);

    int result;
};

// execute unsubscribeall complete event
struct service_unsubscribeall_complete_event: service_event
{
    service_unsubscribeall_complete_event(int a_result = 0);

    int result;
};

// execute inquiry complete event
struct service_inquiry_complete_event: service_event
{
    service_inquiry_complete_event(int a_result = 0);

    int result;
};

// execute interact complete event
struct service_interact_complete_event: service_event
{
    service_interact_complete_event(int a_result = 0);

    int result;
};

// execute activate complete event
struct service_activate_complete_event: service_event
{
    service_activate_complete_event(int a_result = 0, int a_type = 0);

    int result;
    int type;
};
//}                             // end of namespace broadcast

#endif                          // end of #ifndef MTVSERVICE_EVENT_H_INCL
